<% unless flash[:error].nil? %>
    <div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <%= flash[:error] %>
    </div>
<% end %>
<% unless flash[:success].nil? %>
    <div class="alert alert-success alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <%= flash[:success] %>
    </div>
<% end %>